import type { ResponseStruct } from '#/global'
/**
* 获取RdOrganizeUserStand分页列表
* @returns
*/
export function page(data: any): Promise<ResponseStruct<any>> {
    return useHttp().get('organization/rdOrganizeUserStand/list', { params: data })
}

/**
* 添加RdOrganizeUserStand
* @returns
*/
export function create(data: any): Promise<ResponseStruct<any>> {
  return useHttp().post('organization/rdOrganizeUserStand', data)
}
/**
* 更新RdOrganizeUserStand数据
* @returns
*/
export function save(id: number, data: any): Promise<ResponseStruct<any>> {
    return useHttp().put(`organization/rdOrganizeUserStand/${id}`, data)
}

/**
* 将RdOrganizeUserStand删除，有软删除则移动到回收站
* @returns
*/
export function deleteByIds(ids: number[]): Promise<ResponseStruct<null>> {
  return useHttp().delete('organization/rdOrganizeUserStand', { data: ids })
}

/**
* 获取用户管辖区域树
* @param userId 用户ID
* @returns
*/
export function getUserAreaTree(userId: number): Promise<ResponseStruct<any>> {
  return useHttp().get('organization/rdOrganizeUserStand/tree', { params: { user_id: userId } })
}

/**
* 编辑用户管辖区域
* @param data 包含用户ID和站点数据
* @returns
*/
export function editUserArea(data: any): Promise<ResponseStruct<any>> {
  return useHttp().post('organization/rdOrganizeUserStand/edit', data)
}